package com.example.android.story.Utils;

import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;

import java.util.ArrayList;

import cn.bmob.v3.BmobObject;

/**
 * Created by android on 18-5-21.
 */

@Entity(tableName = "_story")
public class Story {
    @NonNull
    @PrimaryKey
    String title;
    @NonNull
    String bundle;

    @NonNull
    String music;

    @NonNull
    String picture;

    @NonNull
    int price;


    public Story(){
        this.price=0;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBundle() {
        return bundle;
    }

    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

    public String getPicture() {
        return picture;
    }


    public String getMusic() {
        return music;
    }

    public void setMusic(String music) {
        this.music = music;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public BmobObject getBmobObject(){
        StoryObj obj=new StoryObj();
        obj.setBundle(this.getBundle());
        obj.setMusic(this.getMusic());
        obj.setPicture(this.getPicture());
        obj.setPrice(this.getPrice());
        obj.setTitle(this.getTitle());
        return obj;
    }
    public class StoryObj extends BmobObject{
        String title;
        String bundle;
        String music;
        String picture;
        Integer price;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getBundle() {
            return bundle;
        }

        public void setBundle(String bundle) {
            this.bundle = bundle;
        }

        public String getMusic() {
            return music;
        }

        public void setMusic(String music) {
            this.music = music;
        }

        public String getPicture() {
            return picture;
        }

        public void setPicture(String picture) {
            this.picture = picture;
        }

        public Integer getPrice() {
            return price;
        }

        public void setPrice(Integer price) {
            this.price = price;
        }
    }
}
